package com.anhry.app.safety.manage.oa.bean;

import java.util.Date;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import com.anhry.app.safety.manage.system.bean.TbUser;

/**
 * 协同办公 邮件 
 */
@Entity
@Table(name="TB_OA_MAIL")
@SequenceGenerator(name="TB_OA_MAIL_SEQ", sequenceName="TB_OA_MAIL_SEQ_DB", allocationSize=1)
public class TbOaMail implements java.io.Serializable {

	// Fields

	private Long id;
	private String mailTitle;
	private String mailContent;
	private String mailAddressee;
	private String mailCc;
	private Date mailTime;
	private TbUser tbUser;
	private String isReturn;
	private String isNote;	//是否短信提醒0：不需要1：需要
	private String noteContent;
	private String isDele;
	private String noteDate;
	private String noteDay;
	private String noteHour;
	private String noteSec;
	private String isExigence; // 是否紧急 
	private String isSubmit;
	private String isDrop;
	private String mailWeek;
	private String mailYear;
	private String mailQuarter;
	private String mailMonth;

	@Id
	@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="TB_OA_MAIL_SEQ")
	@Column(name = "ID", precision = 11, scale = 0)
	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	@Column(name="MAIL_TITLE")
	public String getMailTitle() {
		return this.mailTitle;
	}

	public void setMailTitle(String mailTitle) {
		this.mailTitle = mailTitle;
	}

	@Column(name="MAIL_CONTENT")
	public String getMailContent() {
		return this.mailContent;
	}

	public void setMailContent(String mailContent) {
		this.mailContent = mailContent;
	}

	@Column(name="MAIL_ADDRESS", length=4000)
	public String getMailAddressee() {
		return this.mailAddressee;
	}

	public void setMailAddressee(String mailAddressee) {
		this.mailAddressee = mailAddressee;
	}

	@Column(name="MAIL_CC", length=4000)
	public String getMailCc() {
		return this.mailCc;
	}

	public void setMailCc(String mailCc) {
		this.mailCc = mailCc;
	}

	@Column(name="MAIL_TIME")
	@Temporal(TemporalType.TIMESTAMP)
	public Date getMailTime() {
		return this.mailTime;
	}

	public void setMailTime(Date mailTime) {
		this.mailTime = mailTime;
	}

	@ManyToOne(cascade = {CascadeType.REFRESH}, fetch = FetchType.EAGER)
	@JoinColumn(name="USER_ID")
	public TbUser getTbUser() {
		return tbUser;
	}

	public void setTbUser(TbUser tbUser) {
		this.tbUser = tbUser;
	}

	@Column(name="IS_RETURN", length=1)
	public String getIsReturn() {
		return this.isReturn;
	}

	public void setIsReturn(String isReturn) {
		this.isReturn = isReturn;
	}

	@Column(name="IS_NOTE", length=1)
	public String getIsNote() {
		return this.isNote;
	}

	public void setIsNote(String isNote) {
		this.isNote = isNote;
	}

	@Column(name="NOTE_CONTENT", length=255)
	public String getNoteContent() {
		return this.noteContent;
	}

	public void setNoteContent(String noteContent) {
		this.noteContent = noteContent;
	}

	@Column(name="IS_DELE", length=1)
	public String getIsDele() {
		return this.isDele;
	}

	public void setIsDele(String isDele) {
		this.isDele = isDele;
	}

	@Column(name="NOTE_DATE", length=20)
	public String getNoteDate() {
		return this.noteDate;
	}

	public void setNoteDate(String noteDate) {
		this.noteDate = noteDate;
	}

	@Column(name="NOTE_DAY", length=10)
	public String getNoteDay() {
		return noteDay;
	}

	public void setNoteDay(String noteDay) {
		this.noteDay = noteDay;
	}

	@Column(name="NOTE_HOUR", length=10)
	public String getNoteHour() {
		return noteHour;
	}

	public void setNoteHour(String noteHour) {
		this.noteHour = noteHour;
	}

	@Column(name="NOTE_SEC", length=20)
	public String getNoteSec() {
		return noteSec;
	}

	public void setNoteSec(String noteSec) {
		this.noteSec = noteSec;
	}

	@Column(name="IS_EXIGENCE", length=1)
	public String getIsExigence() {
		return isExigence;
	}

	public void setIsExigence(String isExigence) {
		this.isExigence = isExigence;
	}

	@Column(name="IS_SUBMIT", length=1)
	public String getIsSubmit() {
		return isSubmit;
	}

	public void setIsSubmit(String isSubmit) {
		this.isSubmit = isSubmit;
	}
	
	@Column(name="IS_DROP", length=1)
	public String getIsDrop() {
		return isDrop;
	}

	public void setIsDrop(String isDrop) {
		this.isDrop = isDrop;
	}

	@Column(name="MAIL_WEEK", length=20)
	public String getMailWeek() {
		return mailWeek;
	}

	public void setMailWeek(String mailWeek) {
		this.mailWeek = mailWeek;
	}

	@Column(name="MAIL_MONTH", length=10)
	public String getMailMonth() {
		return mailMonth;
	}

	public void setMailMonth(String mailMonth) {
		this.mailMonth = mailMonth;
	}

	@Column(name="MAIL_QUARTER", length=10)
	public String getMailQuarter() {
		return mailQuarter;
	}

	public void setMailQuarter(String mailQuarter) {
		this.mailQuarter = mailQuarter;
	}

	@Column(name="MAIL_YEAR", length=10)
	public String getMailYear() {
		return mailYear;
	}

	public void setMailYear(String mailYear) {
		this.mailYear = mailYear;
	}

}